<?php

namespace app\api\controller;

use app\admin\model\site\Article;
use app\admin\model\site\Banner;
use app\admin\model\site\PlayProject;
use app\common\controller\Api;

use app\admin\model\user\Player as M_Player;
use think\Config;

/**
 * 会员接口
 */
class Site extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = '*';



    public function config(){

        $data['skills']=Config::get('site.skills');
        $data['post_reward']=Config::get('site.post_reward');
        $data['biz_config']=Config::get('site.biz_config');
        $data['withdraw_min']=Config::get('site.withdraw_min');
        $data['withdraw_max']=Config::get('site.withdraw_max');
        $data['biz_type']=Config::get('site.biz_type');
        $data['withdraw_charge']=Config::get('site.withdraw_charge');
        $data['withdraw_config']=[20,50,100,300,500];
        $data['service_tel']=Config::get('site.service_tel');
        $data['service_qrcode']=Config::get('site.service_qrcode');

        $this->success('',$data);
    }

    public function projects(){
        $list=PlayProject::all();
        $this->success('',$list);
    }

    public function article($id){
        $result=Article::get($id);
        $this->success('',$result);
    }

    public function banner(){
        $result=Banner::all(['status'=>1]);
        $this->success('',$result);
    }
}
